package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SdSaleOrderItem generated by hbm2java
 */
@Entity
@Table(name="sd_sale_order_item"
    ,catalog="ncsc_erp"
)
public class SdSaleOrderItem  implements java.io.Serializable {


     private SdSaleOrderItemId id;
     private MmItem mmItem;
     private SdSaleOrder sdSaleOrder;
     private String soItemCode;
     private String soItemDescr;
     private BigDecimal soQty;
     private BigDecimal soPpu;
     private short soStatusIncVat;
     private BigDecimal soVatPercVal;
     private BigDecimal soVat;
     private BigDecimal soTotalPriceExcVat;
     private BigDecimal soTotalPrice;

    public SdSaleOrderItem() {
    }

	
    public SdSaleOrderItem(SdSaleOrderItemId id, SdSaleOrder sdSaleOrder, BigDecimal soQty, BigDecimal soPpu, short soStatusIncVat, BigDecimal soVatPercVal, BigDecimal soVat, BigDecimal soTotalPriceExcVat, BigDecimal soTotalPrice) {
        this.id = id;
        this.sdSaleOrder = sdSaleOrder;
        this.soQty = soQty;
        this.soPpu = soPpu;
        this.soStatusIncVat = soStatusIncVat;
        this.soVatPercVal = soVatPercVal;
        this.soVat = soVat;
        this.soTotalPriceExcVat = soTotalPriceExcVat;
        this.soTotalPrice = soTotalPrice;
    }
    public SdSaleOrderItem(SdSaleOrderItemId id, MmItem mmItem, SdSaleOrder sdSaleOrder, String soItemCode, String soItemDescr, BigDecimal soQty, BigDecimal soPpu, short soStatusIncVat, BigDecimal soVatPercVal, BigDecimal soVat, BigDecimal soTotalPriceExcVat, BigDecimal soTotalPrice) {
       this.id = id;
       this.mmItem = mmItem;
       this.sdSaleOrder = sdSaleOrder;
       this.soItemCode = soItemCode;
       this.soItemDescr = soItemDescr;
       this.soQty = soQty;
       this.soPpu = soPpu;
       this.soStatusIncVat = soStatusIncVat;
       this.soVatPercVal = soVatPercVal;
       this.soVat = soVat;
       this.soTotalPriceExcVat = soTotalPriceExcVat;
       this.soTotalPrice = soTotalPrice;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="soNo", column=@Column(name="SO_NO", nullable=false) ), 
        @AttributeOverride(name="soItemSeqNo", column=@Column(name="SO_ITEM_SEQ_NO", nullable=false) ) } )
    public SdSaleOrderItemId getId() {
        return this.id;
    }
    
    public void setId(SdSaleOrderItemId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="SO_ITEM_NO")
    public MmItem getMmItem() {
        return this.mmItem;
    }
    
    public void setMmItem(MmItem mmItem) {
        this.mmItem = mmItem;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="SO_NO", nullable=false, insertable=false, updatable=false)
    public SdSaleOrder getSdSaleOrder() {
        return this.sdSaleOrder;
    }
    
    public void setSdSaleOrder(SdSaleOrder sdSaleOrder) {
        this.sdSaleOrder = sdSaleOrder;
    }

    
    @Column(name="SO_ITEM_CODE", length=50)
    public String getSoItemCode() {
        return this.soItemCode;
    }
    
    public void setSoItemCode(String soItemCode) {
        this.soItemCode = soItemCode;
    }

    
    @Column(name="SO_ITEM_DESCR", length=300)
    public String getSoItemDescr() {
        return this.soItemDescr;
    }
    
    public void setSoItemDescr(String soItemDescr) {
        this.soItemDescr = soItemDescr;
    }

    
    @Column(name="SO_QTY", nullable=false, precision=10)
    public BigDecimal getSoQty() {
        return this.soQty;
    }
    
    public void setSoQty(BigDecimal soQty) {
        this.soQty = soQty;
    }

    
    @Column(name="SO_PPU", nullable=false, precision=10)
    public BigDecimal getSoPpu() {
        return this.soPpu;
    }
    
    public void setSoPpu(BigDecimal soPpu) {
        this.soPpu = soPpu;
    }

    
    @Column(name="SO_STATUS_INC_VAT", nullable=false)
    public short getSoStatusIncVat() {
        return this.soStatusIncVat;
    }
    
    public void setSoStatusIncVat(short soStatusIncVat) {
        this.soStatusIncVat = soStatusIncVat;
    }

    
    @Column(name="SO_VAT_PERC_VAL", nullable=false, precision=10)
    public BigDecimal getSoVatPercVal() {
        return this.soVatPercVal;
    }
    
    public void setSoVatPercVal(BigDecimal soVatPercVal) {
        this.soVatPercVal = soVatPercVal;
    }

    
    @Column(name="SO_VAT", nullable=false, precision=15)
    public BigDecimal getSoVat() {
        return this.soVat;
    }
    
    public void setSoVat(BigDecimal soVat) {
        this.soVat = soVat;
    }

    
    @Column(name="SO_TOTAL_PRICE_EXC_VAT", nullable=false, precision=15)
    public BigDecimal getSoTotalPriceExcVat() {
        return this.soTotalPriceExcVat;
    }
    
    public void setSoTotalPriceExcVat(BigDecimal soTotalPriceExcVat) {
        this.soTotalPriceExcVat = soTotalPriceExcVat;
    }

    
    @Column(name="SO_TOTAL_PRICE", nullable=false, precision=15)
    public BigDecimal getSoTotalPrice() {
        return this.soTotalPrice;
    }
    
    public void setSoTotalPrice(BigDecimal soTotalPrice) {
        this.soTotalPrice = soTotalPrice;
    }




}


